Suppressing custom code during GCF operations
Some of the standard Meridian Enterprise events occur during GCF import and export operations. In the following lists, an asterisk (*) is used for brevity but indicates that there are separate Initiate, Before, After, and Terminate events that are otherwise named the same:
-
Briefcase events
BrcEvent_BeforeInclude
BrcEvent_AfterInclude
BrcEvent_BeforeWriteProperty
BrcEvent_BeforeImport
BrcEvent_AfterImport
BrcEvent_AfterReadProperty
BrcEvent_Before_Create
BrcEvent_BeforeOpen
BrcEvent_AfterOpen
BrcEvent_BeforeClose
-
Other events
DocWorkingCopyEvent_*CreateWC
DocWorkingCopyEvent_*SubmitWC
DocWorkflowEvent_*ChangeWFPerson
-
CAD application link event
DocCADLink_BeforeWriteProperty (only occurs when the document type has the Perform automatic title block updates and When a working copy is submitted or a Quick Change is released options enabled.)
-
Work area events
DocWorkAreaEvent_*Assign
DocWorkAreaEvent_*Cancel
DocWorkAreaEvent_*Release
To skip the execution of your custom code (if any) during these events so that it doesn't interfere with Global Collaboration Framework processing, add the following line to the top of the corresponding event handler procedures:
If Vault.Argument("IsGcf") then Exit Sub
Notes
- The name of the argument is case-sensitive.
- The same modification should be made to any custom .NET user interface extensions if they implement handlers for the preceding events. In that case, the GcfEvents extension should be moved to the top of the list of .NET extensions applied to a document type as described in theBlueCielo Meridian Enterprise Configuration Guide.
If you implement a solution based on events defined in script instead of the GcfEvents extension, you must also call the relevant GCF event handler from the regular event handler. For example, when the vault configuration contains logic to handle import from and export to briefcases that are created manually, it is usually desirable to isolate this from the GCF logic. The easiest way to do this is to check the GCF global variable bIsGCF as in the following example:
Sub BrcEvent_BeforeInclude (Batch, Briefcase, CheckOut)
GCFBrc_BeforeInclude Batch, Briefcase, CheckOut
If Not bIsGCF Then
'Code for manual briefcases
End If
End Sub
Note You need to call GCFBrc_BeforeInclude as the first statement in the event handler. GCFBrc_BeforeInclude will check internally if a GCF transfer is being executed and take no action if not. GCFBrc_BeforeInclude should be called first because it contains the code to set bIsGCF and the other GCF-related global variables.